
class SafeBoolean {
    constructor(value) {
        if (typeof value !== 'boolean') {
            throw new TypeError(`Expected boolean, got ${typeof value}`);
        }
        this.value = value;
    }

    valueOf() {
        return this.value;
    }
}